<%--
  Created by IntelliJ IDEA.
  User: LH
  Date: 2022/9/16
  Time: 16:28
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Title</title>
</head>
<body>
<%String remoteAddr = request.getRemoteAddr();
    String ip = remoteAddr.substring(0, 3);
    System.out.println(ip);
    if (ip.equals("172")){
    out.println("禁止访问");
    }else{
        out.println("访问成功");
    }
%>
</body>
</html>
